package com.duwei.ttt;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;


@Component
@ConfigurationProperties(prefix = "duwei")
@Validated
public class ConfigValue {

    @Min(5)
    private String name;

    public void test(){
        System.out.println(name);
    }

    public void setName(String name) {
        this.name = name;
    }
}
